System and method for low power searching in content addressable memories using sample search words

ABSTRACT

An invention is disclosed for reducing power in a CAM using sample words. A sample section of stored data is compared to a corresponding sample section of search data. If the sample section of the stored data is different from the corresponding section of the search data, a non-match result is generated. However, if the sample section of the stored data is equivalent to the corresponding sample section of the search data, the remaining section of the stored data is compared to a corresponding remaining section of the search data. Thus, the remaining section of the stored data is not compared to the corresponding remaining section of the search data if the sample section of the stored data is different from the corresponding section of the search data.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to the following applications: (1) U.S. patent application Ser. No. 09/944,251, filed Aug. 30, 2001, entitled “System and Method for Low Power Search in Content Addressable Memories Using Non-Precharged Compare lines”; and (2) U.S. patent application Ser. No. 09/944,256, filed Aug. 30, 2001, entitled “System and Method for Low Power Search in Content Addressable Memories Using Non-Precharged Match lines.” Each of these related applications is incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates generally to memory circuits, and more specifically to low power search techniques in content addressable memory circuits using sample search words.

2. Description of the Related Art

A content addressable memory (CAM) semiconductor device is a device that allows the entire contents of the memory to be searched and matched instead of having to specify one or more particular memory locations in order to retrieve data from the memory. Thus, a CAM may be used to accelerate any application requiring fast searches of a database, list, or pattern, such as in database machines, image or voice recognition, or computer and communication networks.

CAMs provide performance advantages over conventional memory devices having conventional memory search algorithms, such as binary or tree-based searches, by comparing the desired search term, or comparand, against the entire list of entries simultaneously, giving an order-of-magnitude reduction in the search time. For example, a binary search through a non-CAM based database of 1000 entries may take ten separate search operations whereas a CAM device with 1000 entries may be searched in a single operation, resulting in significant time and processing savings. Internet routers often include a CAM for searching the address of specified data, allowing the routers to perform fast address searches to facilitate more efficient communication between computer systems over computer networks.

Conventional CAMs typically include a two-dimensional row and column content addressable memory core array of cells. In such an array, each row typically contains an address, pointer, or bit pattern entry. In this configuration, a CAM may perform “read” and “write” operations at specific addresses as is done in conventional random access memories (RAMs). However, unlike RAMs, data “search” operations that simultaneously compare a bit pattern of data against an entire list (i.e., column) of pre-stored entries (i.e., rows) can be performed.

FIG. 1A shows a simplified block diagram of a conventional CAM 100. The CAM 100 includes a data bus 102 for communicating data, an instruction bus 104 for transmitting instructions associated with an operation to be performed, and an output bus 106 for outputting a result of the operation. For example, in a search operation, the CAM 100 may output a result in the form of an address, pointer, or bit pattern corresponding to an entry that matches the input data.

As mentioned above, to perform a search operation a CAM includes a plurality of bit pattern entries, each comprising a series of CAM cells coupled to a local match line. FIG. 1B is a schematic diagram showing a prior art bit pattern entry 120 in a conventional CAM. The bit pattern entry 120 includes a plurality of CAM cells 122 coupled to a local match line 124. In addition, the bit pattern entry 120 includes a current generator 126 and precharge circuitry 128 coupled to the local match line 124. The local match line 124 is further coupled to an inverter 130, which is coupled to an inverter latch 132. Each CAM cell 122 is also coupled to a pair of compare lines K0 and K1. Although, for clarity, only one CAM cell 122 is shown coupled to compare lines in FIG. 1B, it should be noted that all the CAM cells 122 are actually coupled to compare lines.

During a search operation, the precharge circuitry 128 precharges the match line 124 to a predictable state, which is generally low, to prepare for the search. The compare data, known as the comparand, is then compared to the bit pattern entry 120. Specifically, compare lines, such as compare lines K0 and K1, are used to compare the comparand to the data stored in the CAM cells 122. The current generator 126 begins to supply current to the match line 124. As the compare data is compared to the data stored in each CAM cell 122, the CAM cell will ground the match line 124 if the data stored in the CAM cell 122 does not match the compare data. Thus, if any CAM cell 122 does not match the compare data, the match line 124 will be pulled low. Conversely, if all the CAM cells 122 in the bit pattern entry 120 match the comparand, the match line 124 will remain high. The signal from the match line 124 is then sent through an inverter 130, and then to the inverter latch 132, which provides a high or low output, as described in greater detail below.

FIG. 1C is a diagram showing exemplary search signals 150 for a conventional CAM. The search signals 150 include an external clock 152, a first compare line K0 154, a second compare line K1 156, an internal clock 158, a match line 160, and a search output 162. As previously mentioned, during a search the compare lines 154 and 156 are used to provide search data to a particular CAM cell. Each compare line 154 and 156 will be set to either high or low, depending on the search data. Typically the compare lines K0 154 and K1 156 are set to the inverse of each other, however, when using a ternary CAM cell both compare lines 154 and 156 may be set to the same value. In the example of FIG. 1C, a first set of search data is placed on the compare lines for the first and second external clock cycle 150 a and 150 b. Then the search data is inverted in the third and fourth external clock cycle 150 c and 150 d. In addition, the data stored in the CAM cell matches the first set of search data, during the first and second external clock cycle 150 a and 150 b, and does not match during the third and fourth external clock cycle 150 c and 150 d.

To set the compare lines 154 and 156 to their appropriate values in a conventional CAM, each compare line 154/156 is first set to a predictable state of zero, or low. Then, one of the compare lines is asserted high. As shown in FIG. 1C, at the rising edge of the first external clock cycle 150 a, both compare lines 154 and 156 are set low. Shortly thereafter, one of the compare lines is asserted high, in this case compare line K0 154, thus in the first external clock cycle 150 a, K0 154 is asserted high and K1 remains low.

Next, at the rising edge of the second external clock cycle 150b, compare line K0 154 is again set to a predictable state of zero. In this case, the search data for this particular CAM cell remains the same in the second external clock cycle 150 b, thus compare line K0 154 is again asserted high shortly after the rising edge of the second external clock cycle 150 b. In a similar manner, both compare lines K0 154 and K1 156 are set to a state of zero at the beginning of the third external clock cycle 150 c. This time the comparand changes, thus switching compare lines K0 154 and K1 156 such that K1 156 is asserted high shortly after the rising edge of the third external clock cycle 150 c, while K0 154 remains low. At the rising edge of the fourth clock cycle 150 d, both compare lines 154 and 156 are set to zero. The search data remains the same for the fourth external clock cycle 150 d, thus compare line K1 156 is again asserted high shortly after the rising edge of the fourth clock cycle 150 d.

Thus, in a conventional CAM the compare lines are pulsed to compare the search data to the data stored in the CAM cell. This results in two transitions for every clock cycle of the external clock 152, regardless of the actual data being placed on the compare lines. As will be explained in greater detail subsequently, each transition requires increased power in the CAM to overcome the capacitance of the compare line.

Continuing with the above example, an internal clock 158 is used to control the search results in the conventional CAM. The internal clock 158 is an inverted clock, which is pulsed slightly after the compare lines 154 and 156 are set to the appropriate search value. As mentioned above, in the example of FIG. 1C the search data matches the data stored in the CAM cell during the first and second external clock cycle 150 a and 150 b, and does not match during the third and fourth external clock cycle 150 c and 150 d. Hence, at leading edge of the first internal clock cycle 158 a, the match line 160 begins to ramp up, since the data stored in the CAM cell matches the comparand in the first external clock cycle 150 a.

The rising match line 160 causes the inverted latch to output a high search output signal 162 during the first internal clock cycle. The precharge circuitry coupled to the match line 160 then causes the match line 160 to discharge and go low at the trailing edge of the first internal clock pulse 158 a. As a result, during the leading edge of the second internal clock pulse 158 b the output signal 162 is low. The output signal 162 then transitions to high after the match line 160 ramps to a sufficient level, later during the second internal clock pulse 158 b. During the third and fourth external clock pulses 150 c and 150 d, the data stored in the CAM cell does not match the comparand. Hence, both the match line 160 and the output signal 162 are low during the third and fourth internal clock pulses 158 c and 158 d. Thus, during consecutive match results, the output signal 162 of the conventional CAM generally must transition from low to high during each internal clock cycle.

Each output 162 for each bit pattern entry of the CAM is coupled to a global match line, which is a long line that provides the search results to other areas of the CAM for further processing, such as to priority encoders. The long length of the global match lines results in each global match line having a large capacitance. As a result, every transition on a global match line requires a large amount of power to overcome the large capacitance. Since the output signals from the bit pattern entries propagate to the global match lines, every transition in the output signal results in a large power drain on the CAM. A similar result occurs with respect to the compare lines, each transition in the compare lines requires increased power from the CAM to overcome the capacitance of the compare line.

In view of the foregoing, there is a need for low power search methods for use in content addressable memory circuits. The methods should reduce the power required to perform searches in the CAM, and decrease the amount of transitions required during search operations.

SUMMARY OF THE INVENTION

Broadly speaking, the present invention fills these needs by providing systems and methods for reducing power in a CAM using sample words. In one embodiment, a method for low power searching in a CAM by testing a sample section of the bit pattern is disclosed. The method includes comparing a sample section of stored data to a corresponding sample section of search data. If the sample section of the stored data is different from the corresponding section of the search data, a non-match result is generated. However, if the sample section of the stored data is equivalent to the corresponding sample section of the search data, the remaining section of the stored data is compared to a corresponding remaining section of the search data. Thus, the remaining section of the stored data is not compared to the corresponding remaining section of the search data if the sample section of the stored data is different from the corresponding section of the search data. Generally, to reduce power in the sample test, the sample section is smaller than the remaining section of the bit pattern.

A match line for a CAM is disclosed in another embodiment of the present invention. The match line includes a sample match line coupled to a first set of CAM cells, and a sub-match line coupled to a second set of CAM cells. Sample circuitry is also included that is coupled to both the sample match line and the sub-match line. The sample circuitry provides current to the sub-match line if a sample section of search data corresponding to the first set of CAM cells is equivalent to the data stored in the first set of CAM cells. The sample circuitry preferably does not provide current to the sub-match line when the sample section of the search data corresponding to the first set of CAM cells is different from the data stored in the first set of CAM cells.

A content addressable memory is disclosed in a further embodiment of the present invention. The content addressable memory includes sample circuitry coupled to a first clock and a second clock. In addition, a sample match line is included that is coupled to the sample circuitry and to a first set of CAM cells. A sub-match line is also coupled to the sample circuitry and to a second set of CAM cells. The sample circuitry provides current to the sub-match line if a sample section of search data corresponding to the first set of CAM cells is equivalent to data stored in the first set of CAM cells. Conversely, when the sample section of the search data corresponding to the first set of CAM cells is different from the data stored in the first set of CAM cells, the sample circuitry does not provide current to the sub-match line. The first set of CAM cells coupled to the sample match line is compared to the corresponding sample section of search data during a clock pulse of the first clock, and the second set of CAM cells coupled to the sub-match line is compared to a corresponding remaining section of the search data during a clock pulse of the second clock.

The embodiments of the present invention advantageously reduce the amount of power required in the CAM during search operations by injecting less current into the match lines of bit pattern entries that do not match the sample section of the comparand. Other aspects and advantages of the invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention, together with further advantages thereof, may best be understood by reference to the following description taken in conjunction with the accompanying drawings in which:

FIG. 1A shows a simplified block diagram of a conventional CAM;

FIG. 1B is a schematic diagram showing a prior art bit pattern entry in a conventional CAM;

FIG. 1C is a diagram showing exemplary search signals for a conventional CAM;

FIG. 2 illustrates a CAM chip including two macros, in accordance with one embodiment of the present invention;

FIG. 3 illustrates a single core that incorporates its own maintenance port and its own search port, in accordance with an embodiment of the present invention;

FIG. 4 illustrates a portion of the maintenance port and simplified versions of a sub-block, in accordance with an embodiment of the present invention;

FIG. 5 is a schematic diagram showing a bit pattern entry, in accordance with an embodiment of the present invention;

FIG. 6 is a schematic diagram showing a binary CAM cell, in accordance with an embodiment of the present invention;

FIG. 7 is a schematic diagram showing a ternary CAM cell, in accordance with an embodiment of the present invention;

FIG. 8 is a diagram showing exemplary search signals, in accordance with an embodiment of the present invention;

FIG. 9 is a flowchart showing a method for low power searching in a CAM, in accordance with an embodiment of the present invention;

FIG. 10 is a schematic diagram showing a bit pattern entry, in accordance with an embodiment of the present invention;

FIG. 11 is a diagram showing exemplary search signals including the search output for a bit pattern entry, in accordance with an embodiment of the present invention;

FIG. 12 is flowchart showing a method for low power searching in a CAM having reduced output transitions, in accordance with an embodiment of the present invention;

FIG. 13 is a schematic diagram showing a divided bit pattern entry, in accordance with an embodiment of the present invention;

FIG. 14 is schematic diagram of a bit pattern entry configured for a NOR/NOR type search, in accordance with an embodiment of the present invention;

FIG. 15 is a schematic diagram showing a sample circuit, in accordance with an embodiment of the present invention;

FIG. 16 is a diagram showing exemplary search signals for bit pattern entry configured for a NOR/NOR type search, in accordance with an embodiment of the present invention;

FIG. 17 is a diagram showing exemplary search signals for bit pattern entry configured for a NOR/NOR type search, in accordance with an embodiment of the present invention; and

FIG. 18 is a flowchart showing a method for reducing power in a CAM during search operations using sample match lines, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

An invention is disclosed for low power search methods in content addressable memories. To this end, embodiments of the present invention provide methods that reduce power during searches by testing a sample section of a bit pattern entry against a corresponding sample section of the comparand, and generating a miss if the sample test fails, thus avoiding testing of the remaining section of the comparand. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some or all of these specific details. In other instances, well known process steps have not been described in detail in order not to unnecessarily obscure the present invention.

FIGS. 1A-1C were described in terms of the prior art. FIG. 2 illustrates a CAM chip 200 including two macros 205 a and 205 b, in accordance with one embodiment of the present invention. A chip can, in other embodiments, include one or more macros 205 depending on the application. Each macro 205 is shown including a plurality of cores 204, and each core 204 is accompanied by its associated maintenance port (MP) 203 and search port (SP) 202. In this example, the CAM chip 200 has macros 205 that include eight cores 204 each. Thus, each core 204 is a two-port core having its associated MP 203 and SP 202. The search ports 202 are configured to incorporate circuitry for performing searches in the memory of each of the cores 204, and the maintenance ports 203 assist in performing write operations, read operations, and other maintenance-related operations to each of the associated cores 204.

FIG. 3 illustrates a single core 204 that incorporates its own maintenance port 203 a and its own search port 202 b, in accordance with an embodiment of the present invention. Each core 204 includes a plurality of sub-blocks 312. In this example, the core 204 has eight sub-blocks 312, and each sub-block 312 has a width to hold a 32-bit word 320, and extends to form a column of 512 rows. It should be understood that the actual “word” 320 width and rows of a sub-block can vary depending on the desired application.

The core 204 also includes a row decoder 307 and a priority encoder (PE) 306. As is well known, the priority encoder 306 is configured to prioritize which match of potentially many matches has the highest priority and thus, is most likely to be the address for the data being searched.

The maintenance port 203 a is configured to enable the reading and writing to the addresses selected from the sub-blocks 312 in order to modify and update the contents of the memory for subsequent search operations. In a preferred embodiment, the maintenance port operations are performed independently from the search port 202 b operations and are coordinated such that searches continue uninterrupted by way of the search port 202 b, while the maintenance port 203 a operations occur in parallel with the search operations.

The maintenance port 203 a preferably includes a Z decoder that enables only one word in a selected sub-block 312 at one time. To accomplish this, a logical AND is performed between a global wordline and a Z decode line. In this manner, it is possible to access only one word 320 during a read or write operation. The implementation of a Z decode is also referred to as a divided wordline implementation.

For example, FIG. 4 illustrates a portion of the maintenance port 203 a and simplified versions of a sub-block 312. Traversing each of the sub-blocks 312 is a global wordline (GWL). The GWL is coupled to a logical AND gate 426, which is also coupled to a Z decode line (Z1). The output of the AND gate 426 is a local wordline 428 for each sub-block 312. In this embodiment, the sub-block 312 is 32-bits in width and also includes a valid bit 320 a. For completeness, a pair of exemplary bitlines is drawn vertically across each of the sub-blocks 312 and coupling to the local wordline 428. Thus, the AND gate 426 is configured to activate only one local wordline 428 depending upon the signals provided to the respective AND gates 426 which are coupled between Z decode lines (Z1). Inverse multiplexers 422 are provided within the maintenance port 203 a and are configured to communicate with the bitlines of the individual sub-blocks 312. In a preferred embodiment, the maintenance port 203 a includes 32 inverse multiplexers 422 that appropriately select the correct bitlines of the sub-blocks 312.

As shown in FIG. 4, in addition to a local wordline, each bit pattern entry in a sub-block 312 includes a local match line 434. Generally, each local match line 434 is asserted high during a search operation whenever the data associated with the local match line 434 matches the comparand of the search operation. This is often referred to as a “hit.” Conversely, when the data associated with the local match line 434 does not match the comparand of the search operation, the local match line 434 is pulled low, often referred to as a “miss.”

Power Savings in Compare Lines

FIG. 5 is a schematic diagram showing a bit pattern entry 500, in accordance with an embodiment of the present invention. The bit pattern entry 500 includes a plurality of CAM cells 502 coupled to a local match line 504. The local match line 504 is further coupled to an inverter 506, which is coupled to an inverter latch 508. Each CAM cell 502 is also coupled to a pair of compare lines K0 and K1. Although, for clarity, only one CAM cell 502 is shown coupled to compare lines in FIG. 5, it should be noted that all the CAM cells 502 are actually coupled to compare lines.

Each CAM cell 502 can be any type of CAM cell suitable for storing data for later search operations, such as a binary CAM cell or a ternary CAM cell as shown in FIGS. 6 and 7, respectively. FIG. 6 is a schematic diagram showing a binary CAM cell 600, in accordance with an embodiment of the present invention. The binary CAM cell 600 includes a storage element 602 having normal and complementary outputs c and {overscore (c)}, and n-channel transistors 604-610. The normal output c of the storage element 602 is coupled to the gate of transistor 604, while the complementary output {overscore (c)} of the storage element 602 is coupled to the gate of transistor 606. A first compare line K0 is coupled to the gate of transistor 608, and a second compare line K1 is coupled to the gate of transistor 610. In addition, one terminal of transistor 608 is coupled to the match line 504 and the other terminal of transistor 608 is coupled to a terminal of transistor 604. The other terminal of transistor 604 is coupled to ground. Further, a terminal of transistor 610 is also coupled to the match line 504 and the other terminal of transistor 610 is coupled to a terminal of transistor 606. The other terminal of transistor 606 is coupled to ground.

In operation, a value is stored in the storage element 602. The value stored in the storage element 602 is then placed on the normal output c, while the inverse of the stored value is placed on the complementary output {overscore (c)}. During a search operation the search data is compared to the value stored in the storage element 602 using the compare lines K0 and K1. The search data comprises the actual values placed on the compare lines that represent the value being compared to the data stored in the CAM cell. More specifically, the value being compared is placed on compare line K1, while the inverse is placed on K0. If the search data matches the value stored in the storage element 602, the match line 504 will remain high, otherwise the match line 504 will be grounded and pulled low.

For example, if a 1 is stored in the storage element 602, a 1 will be placed at the gate of transistor 604 thus turning transistor 604 on, while a 0 will be placed at the gate of transistor 606, thus turning transistor 606 off. If the search data for this particular binary CAM cell 600 is a 1, the compare line K1 will be high, or 1, while the compare line K0 will be low, or 0. As a result, a 1 will be placed at the gate of transistor 610, thus turning transistor 610 on, and a 0 will be placed at the gate of transistor 608, thus turning transistor 608 off. At this point, both paths to ground are now closed since transistors 606 and 608 are off. Thus, the charge on the match line will remain high.

On the other hand, if the search data for this particular binary CAM cell 600 is a 0, the compare line K1 will be low, or 0, while the compare line K0 will be high, or 1. As a result, a 0 will be placed at the gate of transistor 610, thus turning transistor 610 off, and a 1 will be placed at the gate of transistor 608, thus turning transistor 608 on. At this point, the path to ground comprising transistors 604 and 608 is now open, and as a result, the match line 504 will be grounded, and thus pulled low. Similar results occur when the value stored in the storage element is a 0. Another form of CAM cell is a ternary CAM cell as illustrated in FIG. 7.

FIG. 7 is a schematic diagram showing a ternary CAM cell 700, in accordance with an embodiment of the present invention. The ternary CAM cell 700 includes a pair of storage elements 702 a and 702 b, which can comprise any type of storage element capable of storing a binary value, such as a SRAM. The output c1 of storage element 702 a is coupled to the gate of transistor 604, while the output c0 of storage element 702 b is coupled to the gate of transistor 606. Otherwise, the ternary CAM cell is configured in a manner similar to the binary CAM cell of FIG. 6.

During operation the two storage elements 702 a and 702 b include values that are the inverse of each other. Thus, if the ternary CAM cell 700 stored a value of 1, storage element 702 a would store a 1, while storage element 702 b would store a 0. In this configuration, a search operations occurs in a manner similar to the binary CAM cell. However, the ternary CAM cell 700 further allows the storage of a “don't care” value that provides an unconditional match for any comparand used in searching the ternary CAM cell 700.

Generally, a don't care value is represented in the ternary CAM cell 700 by storing a 0 in both storage elements 702 a and 702 b. In this case, transistors 604 and transistors 606 will both be turned off, thus blocking any path to ground from the match line 504 through the ternary CAM cell 700. Thus, the match line 504 will be allowed to remain high regardless of what values are placed on compare lines K0 and K1. Another way to force an unconditional match in both the ternary CAM cell 700 and the binary CAM cell 600, is by placing a 0 on both compare lines K0 and K1. This is also referred to as “masking”. When this done both transistors 608 and 610 will turn off, thus blocking any path to ground from the match line 504 through the CAM cell. As a result, the match line 504 will be allowed to remain high regardless of what value is stored in the CAM cell.

Referring back to FIG. 5, embodiments of the present invention reduce the number of transitions occurring on the compare lines K0 and K1 by allowing the compare lines to remain in the same state from clock cycle to clock cycle when the search data remains the same.

FIG. 8 is a diagram showing exemplary search signals 800, in accordance with an embodiment of the present invention. The search signals 800 include an external search clock 802, a first compare line K0 and a second compare line K1. As previously mentioned, prior art CAMs reset both compare lines to a predictable value of zero before each search each clock cycle, which resulted in unwanted transitions. The embodiments of the present invention reduce the number of transitions occurring on the compare lines. The compare lines K0 and K1 are not precharged to zero each clock cycle, instead the compare lines K0 and K1 are allowed to remain in the same state during consecutive clock cycles if the search data placed on the compare lines remains the same.

FIG. 8 shows an example in which the search data for compare lines K0 and K1 remains the same for first and second external clock cycles 802 a and 802 b. The search data then changes between second and third external clock cycles 802 b and 802 c, and finally, remains the same between the third and fourth external clock cycles 802 c and 802 d. As shown in FIG. 8, initially the value of compare line K0 is 0 and the value of compare line K1 is 1. At the leading edge of the first external clock cycle 802 a the values change such that compare line K0 transitions to a value of 1 and compare line K1 transitions to a value of 0.

At the leading edge of the second external clock cycle 802 b the compare lines are updated. However, since the search data remains the same between the first and second external clock cycles 802 a and 802 b, the compare lines K0 and K1 are allowed to retain the same values. At the leading edge of the third external clock cycle 802 c, the search data changes. As a result, the compare lines are updated to their new values, in this case, compare line K0 transitions to a value of 0 while compare line K1 transitions to a value of 1. The data then remains the same between the third and fourth external clock cycles 802 c and 802 d, and allowed to retain the same values. Comparing FIG. 8 to prior art FIG. 1C, for the same search data sequence four transitions occur in the compare lines of the conventional CAM, while only two transitions occur in the compare lines of a CAM of the embodiments of the present invention. The reduced compare line transitions of the embodiments of the present invention result in large power savings.

Statistically, the chance of a particular compare line changing in a normal CAM operation is about 50%. Thus, the embodiments of the present invention reduce the number of transition occurring on the compare lines of the CAM by about half. As a result, the power in the compare lines in the embodiments of the present invention is reduced by about 50% as compared to the power in the compare lines of convention CAM devices.

FIG. 9 is a flowchart showing a method 900 for low power searching in a CAM, in accordance with an embodiment of the present invention. In an initial operation 902, preprocess operations are performed. Preprocess operations include configuring the storage locations of the CAM, and other preprocess operations that will be apparent to those skilled in the art.

In operation 904, a first set of search data is obtained. Generally, the search data is obtained from the search port of the CAM. In particular, a comparand is obtained from the search port. Each bit of the comparand is then used as search data for a particular CAM cell of a bit pattern entry. This search data is then used to search the particular CAM cell of the bit pattern entry. If the search data for a particular CAM cell matches the data stored in the CAM cell, the CAM cell does not pull the match line low. However, if the search data for the particular CAM cell does not match the data stored in the CAM cell, the CAM cell pulls the match line low. After obtaining the first set of search data the compare lines are configured in operation 906.

During a first clock cycle, the compare lines for the CAM cell are configured in a first state based on the first set of search data, in operation 906. Specifically, the search data for the CAM cell is placed on the compare lines. Generally, the search data comprises inverse signals placed on the compare lines, which is then compared to the data stored in the CAM cell. If the search data represented by the compare lines matches the data stored in the CAM cell, the CAM cell will not ground the local match line. Otherwise, the CAM cell grounds the local match line, thus pulling the match line low.

After performing a search using the first set of search data, a second set of search data is obtained, in operation 908. During the next clock cycle new search data is obtained from the search port for another search. It should be borne in mind that the new search data statistically has a 50% chance of changing from the first set of search data for the CAM cell. Thus, 50% of time the data on the compare lines does not change.

A decision is then made as to whether the second set of search data is equivalent to the first set of search data, in operation 910. If the second set of search data is equivalent to the first set of search data, the method 900 continues with operation 912. Otherwise, the method 900 continues with operation 914.

The compare lines are allowed to remain in the first state during the second clock cycle, in operation 912. The embodiments of the present invention reduce the number of transitions occurring on the compare lines. The compare lines are not precharged to zero each clock cycle. Instead, the compare lines are allowed to remain in the same state during consecutive clock cycles if the search data placed on the compare lines remains the same.

The compare lines are configured in a second state based on the second set of search data during the second clock cycle, in operation 914. If the second set of search data is different from the first set of search data for the CAM cell, the compare lines are either inverted or both set low depending on the value of the second set of search data. Generally, both compare lines will be set low only when the search data is masked to indicate a “don't care.”

Post process operations are performed in operation 916. Post process operations include performing maintenance operations on the CAM cells, continued search operations, and other post process operations that will be apparent to those skilled in the art. Statistically, the chance of a particular compare line changing in normal CAM operation is about 50%. Thus, the embodiments of the present invention advantageously reduce the number of transition occurring on the compare lines of the CAM by about half. As a result, the power in the compare lines in the embodiments of the present invention is reduced by about 50% as compared to the power in the compare lines of convention CAM devices.

Power Savings in Match Line—No Precharge

In addition, to saving power in the compare lines during search operations, embodiments of the present invention further save power in the match lines of the present invention by avoiding precharge operations.

FIG. 10 is a schematic diagram showing a bit pattern entry 1000, in accordance with an embodiment of the present invention. The bit pattern entry 1000 includes a plurality of CAM cells 502 coupled to a local match line 504. The local match line 504 is further coupled to an inverter 506, which is coupled to an inverter latch 508. Each CAM cell 502 is also coupled to a pair of compare lines K0 and K1. Although, for clarity, only one CAM cell 502 is shown coupled to compare lines in FIG. 10, it should be noted that all the CAM cells 502 are actually coupled to compare lines. Each CAM cell 502 can be any type of CAM cell suitable for storing data for later search operations, such as a binary CAM cell or a ternary CAM.

Further included in the bit pattern entry 1000 are a first and second p-channel transistors 1002 and 1004, and an internal clock 1006. The gate of transistor 1002 is coupled to ground. Further, the source of transistor 1002 is coupled to V_(dd) while the drain of transistor 1002 is coupled to the source of transistor 1004. The drain of transistor 1004 is coupled to the local match line 504, and the gate of transistor 1004 is coupled to the internal clock 1006. The internal clock 1006 is also coupled to the inverter latch 508. Transistors 1002 and 1004 form a current generator, which is controlled by the internal clock 1006. In one embodiment, the internal clock 1006 is an inverted clock, and is pulsed after the external clock updates the compare lines K0 and K1.

The embodiments of the present invention reduce power usage in a CAM by allowing the match line to remain charged during consecutive match results. More specifically, since the gate of transistor 1002 is tied to ground, transistor 1002 remains open to provide current from V_(dd). The gate of transistor 1004 is coupled to the internal clock 1006, which is an inverted clock, thus whenever the internal clock 1006 is pulsed transistor 1004 turns on, which allows current to flow from V_(dd) to the match line 504. The period of time when the internal clock 1006 is low, and thus current is being injected into the match line 504, will be referred to as the active search.

During the active search, current from V_(dd) is provided to the match line 504. However, unlike conventional CAMs, embodiments of the present invention do not precharge the match line 504 to zero prior to each search operation. Hence, the match line 504 of the embodiments of the present invention, generally only discharges when a CAM cell does not match the search data and thus pulls the match line 504 low.

FIG. 11 is a diagram showing exemplary search signals 1100 including the bit pattern entry output, in accordance with an embodiment of the present invention. The exemplary search signals 1100 include the external clock 802, compare lines K0 and K1, the internal clock 1006, the match line 504, and the bit pattern entry output 1102.

FIG. 11 shows an example in which the search data for compare lines K0 and K1 remains the same for first and second external clock cycles 802 a and 802 b, and changes between the second and third external clock cycles 802 b and 802 c. The search data for the compare lines K0 and K1 then remains the same between the third and fourth external clock cycles 802 c and 802 d. Further, the comparand of the search operations matches the bit pattern entry during the first and second external clock cycles 802 a and 802 b, and does not match the bit pattern entry during the third and fourth external clock cycles 802 c and 802 d. As will be seen, embodiments of the present invention reduce power usage during search operations by allowing the match line to remain charged between consecutive matches, thus avoiding precharging of the match line 504.

In operation, the search data is placed on the compare lines K0 and K1 at the beginning of the first external clock signal 802 a. After the compare lines K0 and K1 have attained their appropriate values, the internal clock 1006 is pulsed to begin the first active search 1006 a. During the active search the match line 504 begins to ramp up to point 1104 as a result of being charged by the current generator, comprised of transistor 1002 and 1004. As the match line 504 ramps up during the first active search 1006 a, the inverter 506 and inverter latch 508 coupled to the match line 504 transition the output 1102 from low to high, at point 1106. It should be noted that the voltage of the match line 504 at point 1104 may or may not be equal to V_(dd) depending on the particular implementation. However, if the voltage of the match line 504 at point 1104 is not V_(dd), the match line voltage at point 1104 will preferably be sufficiently high to drive the bit pattern entry output 1102 high at point 1106.

Since in this example the search data remains the same during the second external clock cycle 802 b, the data stored in the bit pattern entry will again match the comparand during the second external clock cycle 802 b. Thus, at the leading edge of the second internal clock pulse 1006 b, the match line 504 is again injected with current from the current generator. As previously mentioned, the previous match line current at point 1104 may not be equal to V_(dd). However, a second consecutive match result on the match line 504 will generally ramp the match line up to V_(dd) at point 1108.

Unlike a conventional CAM, which precharges the match line to zero prior to each active search, embodiments of the present invention do not automatically discharge the match line 504 between active searches. Thus, if the match line 504 is high as a result of a match during the previous clock cycle, the match line 504 will remain high at the leading edge of the subsequent clock cycle if the comparand continues to match the data stored in the bit pattern entry.

Moreover, since the output 1102 follows the match line 504, the output 1102 remains high for the duration of the first and second internal clock cycles 1006 a and 1006 b. More specifically, during the consecutive matches occurring in the first and second external clock cycles 802 a and 802 b, the voltage of the match line 504 remains at a high level, thus continuously driving the output 1102 of the bit pattern entry high for the first and second clock cycles.

Then, during the third external clock cycle 802 c, the comparand changes and no longer matches the data stored in the bit pattern entry. As the compare lines K0 and K1 change to the new values of the comparand, the CAM cells of the bit pattern entry that do not match the new comparand data will pull the match line 504 low. As a result, during the third active search 1006 c the output 1102 goes low when the voltage of the match line 504 reaches a level that is too low to drive the output 1102 high. In addition, since the comparand also does not match the data stored in the bit pattern entry in the fourth external clock cycle 802 d, the non-matching CAM cells again pull the match line 504 low. As a result, the output 1102 remains low during the fourth active search 1006 d.

Each output 1102 for each bit pattern entry in the CAM is coupled to a global match line, which is a long line that provides the search results to other areas of the CAM for further processing, such as to priority encoders. The long length of the global match lines results in each global match line having a large capacitance. As a result, every transition on a global match line requires a large amount of power to overcome the large capacitance of the global match line. Since the output signals from the bit pattern entries propagate to the global match lines, every transition in the output signals results in a large power drain on the CAM.

Advantageously, transitions occur in the match line outputs 1102 of the embodiments of the present invention only when there is a match change from a miss result to a match result, or a match result to a miss result. Comparing the match line output 1102 of the present invention with the match line output 162 of a conventional CAM, as shown in FIG. 1C, twice the number of transitions occur in the prior art match line output 162 than occur in the match line output 1102 of the present invention. This is a result of the precharging of the match line 162 that occurs in a conventional CAM between active searches. During consecutive match results or during consecutive miss results in the embodiments of the present invention there are no transitions in the match line output 1102. The reduced match line output 1102 transitions also reduces number of transitions occurring in the global match lines throughout the CAM, resulting in tremendous power savings for the CAM as a whole.

FIG. 12 is flowchart showing a method 1200 for low power searching in a CAM having reduced output transitions, in accordance with an embodiment of the present invention. In an initial operation 1202, preprocess operations are performed. Preprocess operations include configuring the bit pattern entries for the CAM, obtaining a comparand from the search port, and other preprocess operations that will be apparent to those skilled in the art.

During operation 1204, the match line is configured in a first state based on a first search result. After the comparand is compared to the data stored in the bit pattern entry, the result of that comparison is known as a search result. In operation, the match line for the bit pattern entry is configured to reflect the search result. Typically, the match line is configured to be high when the search result is a hit, and low when the search result is a miss. However, embodiments of the present invention can be configured such that the match line is low when the search result is a hit, and high when the search result is a miss. Thus, in operation 1204, the match line is configured in a first state, signifying a hit or a miss depending on the particular configuration of the CAM.

In operation 1206, search data for a subsequent search is compared with the data stored in the bit pattern entry to obtain a second search result. A comparand is obtained from the search port. Each bit of the comparand is then used as search data for a particular CAM cell of the bit pattern entry. This search data is then used to search the particular CAM cell of the bit pattern entry. The result of the comparison of the comparand to the bit pattern entry is the second search result.

A decision is then made as to whether the second search result is equivalent to the first search result, in operation 1208. If the second search result is equivalent to the first search result, the method 1200 continues with operation 1210. Otherwise, the method 1200 continues with operation 1212.

The match line is allowed to remain in the first state during the second clock cycle, in operation 1210. Unlike a conventional CAM, which precharges the match line to zero prior to each active search, embodiments of the present invention do not automatically discharge the match line between active searches. Thus, if the match line is high as a result of a match during the previous clock cycle, the match line will remain high at the leading edge of the subsequent clock cycle if the comparand continues to match the data stored in the bit pattern entry. Correspondingly, if the match line is configured such that a high result signifies a miss, the match line will remain high during consecutive misses. During consecutive matches occurring in the first and second clock cycles, the voltage of the match line remains at a high level, thus continuously driving the output of the bit pattern entry high for the first and second clock cycles.

The match line is configured in a second state based on the second search result, in operation 1212. When the search results on consecutive clock cycles are not equivalent the match line transitions from one state to a second different state. In this case, the match line transitions from the first state to a second state to signify the data no longer matches, or in some cases as described above, the data now matches the comparand. In one embodiment, if the search data for a particular CAM cell matches the data stored in the CAM cell, the CAM cell does not pull the match line low. However, if the search data for the particular CAM cell does not match the data stored in the CAM cell, the CAM cell pulls the match line low.

Post process operations are performed in operation 1214. Post process operations include CAM maintenance operations, subsequent search operations, and other post process operations that will be apparent to those skilled in the art. As previously mentioned, transitions occur in the match line outputs of the embodiments of the present invention only when there is a match change from a miss result to a match result, or a match result to a miss result. During consecutive match results or during consecutive miss results in the embodiments of the present invention there are no transitions in the match line output. The reduced match line output 1102 transitions also reduces the number of transitions occurring in the global match lines throughout the CAM, resulting in tremendous power savings for the CAM as a whole.

To increase the speed of searches without affecting power consumption, the match line can be divided in two. FIG. 13 is a schematic diagram showing a divided bit pattern entry 1300, in accordance with an embodiment of the present invention. The divided bit pattern entry 1300 includes a plurality of CAM cells 502 coupled to a match line comprised of two sub-match lines 504 a and 504 b. Sub-match line 504 a is coupled to a first inverter 506 a, which is coupled to a NOR gate 1302. Similarly, sub-match line 504 b is coupled to a second inverter 506 b, which is coupled to the NOR gate 1302. The NOR gate 1302 is further coupled to a latch 1304.

Individually, each sub-match line 504 a and 504 b of the divided bit pattern entry 1300 functions similar to the match line 504 of FIG. 10. The signals from each sub-match line 506 a and 506 b are then combined using the NOR gate 1302. The NOR gate 1302 ensures that the signal provided to the latch 1304 will be high only when both sub-match lines 506 a and 506 b are high. If either sub-match line 506 a or 506 b is pulled low by a non-matching CAM cell 502, the signal provided to the latch 1304 will be low. The latch 1304 then latches the match line output until the next active search. The divided bit pattern entry 1300 reduces the amount of capacitance from the match line by reducing the length of the match line in half, using the two sub-match lines 506 a and 506 b. The reduced match line capacitance results in higher speed of the search operations.

Power Savings in Match Line—NOR/NOR Type Search

The majority of power used during search operations involves the injection of current into the local match lines of the CAM during search operations. Embodiments of the present invention address this issue by reducing the amount of current injected into a local match line if a portion of the match line, which is searched first, does not match the corresponding portion of the comparand. Using a NOR/NOR type of search, embodiments of the present invention are capable of reducing the current injected into the local match lines of the CAM during search operations by as much as 75%.

FIG. 14 is schematic diagram of a bit pattern entry 1400 configured for a NOR/NOR type search, in accordance with an embodiment of the present invention. The bit pattern entry 1400 includes a plurality of CAM cells 502 coupled to a match line comprised of two sample match lines 1402 a and 1402 b, and two sub-match lines 1404 a and 1404 b. Sample match line 1402 a is coupled to the sub-match line 1404 a via sample circuit 1406 a. Similarly, sample match line 1402 b is coupled to the sub-match line 1404 b via sample circuit 1406 b. The sub-match lines 1404 a and 1404 b are coupled to inverters 506 a and 506 b, respectively, which are coupled to a NOR gate 1302. The output of the NOR gate is provided to a latch 1304, which latches the output of bit pattern entry.

In the following description n is the total number of CAM cells 502 comprising the bit pattern entry 1400. In addition, m is the total number of CAM cells 502 coupled to the sample match lines 1402 a and 1402 b. Thus, m/2 is the number of CAM cells 502 coupled to each sample match line 1402 a and 1402 b. Similarly, (n−m)/2 is the number of CAM cells 502 coupled to each sub-match line 1404 a and 1404 b. Further, m is much smaller than n (m<<n).

During a search operation, the NOR/NOR bit pattern entry 1400 first compares the search data with the CAM cells 502 coupled to the sample match lines 1402 a and 1402 b. As in the embodiments discussed previously, if a particular CAM cell 502 does not match the search data, the CAM cell 502 will pull the sample match line 1402 a or 1402 b low. Otherwise, the sample match line 1402 a or 1402 b will remain high.

The results of the comparison with the sample match lines 1402 a and 1402 b are then provided to the sample circuits 1406 a and 1406 b, respectively. Each of the sample circuits 1406 a and 1406 b determine whether a hit occurred on the sample match line 1402 a/1402 b coupled to the sample circuit 1406 a/1406 b. Searches will then occur only on sub-match lines 1404 a and 1404 b wherein a hit occurred on the sample match line 1402 a and 1402 b, respectively. Specifically, if the sample match line 1402 a is high, the sample circuit 1406 a injects current into the sub-match line 1404 a, thus allowing the CAM cells 502 coupled to the sub-match line 1404 a to be compared to the search data. Otherwise, the sample circuit 1406 a does not inject current into the sub-match line 1404 a, thus avoiding a search of the CAM cells 502 coupled to the sub-match line 1404 a. Sample circuit 1406 b performs in a similar manner to sample match line 1402 a and sub-match line 1404 b as does sample circuit 1406 a.

The sub-match lines 1404 a and 1404 b will only remain high when both their respective sample match lines 1402 a and 1402 b are high, and the CAM cells 502 coupled to the sub-match lines 1404 a and 1404 b match the remaining search data. The signals from each sub-match line 1404 a and 1404 b are then combined using the NOR gate 1302. The NOR gate 1302 ensures that the signal provided to the latch 1304 will be high only hen both sub-match lines 1404 a and 1404 b are high. If either sub-match line 1404 a or 1404 b is pulled low, the signal provided to the latch 1304 will be low. The latch 1304 then latches the match line output until the next active search.

To separate the search operations on the sample match lines 1402 a and 1402 b and the sub-match lines 1404 a and 1404 b, two internal clocks are used. The first internal clock/CLK1 manages the active search of the sample match lines 1402 a and 1402 b, and the second internal clock/CLK2 manages the active search of the sub-match lines 1404 a and 1404 b as well as the latch 1304. Since the sample match lines 1402 a and 1402 b are coupled to far less CAM cells 502 than are the sub-match lines 1404 a and 1404 b, the sample match lines 1402 a and 1402 b are generally much shorter than the sub-match lines 1404 a and 1404 b. As a result, less current is required to perform a search operation using the sample match lines 1402 a and 1402 b than is required when using the sub-match lines 1404 a and 1404 b. Thus, the first internal clock/CLK1 pulse is of a shorter duration than the second internal clock/CLK2 pulse. In addition, the embodiment shown in FIG. 14 shows the first and second clocks/CLK1 and /CLK2 as inverted clocks. However, it should be noted that other types of clocks can be used in the embodiments of the present invention, as will be apparent to those skilled in the art.

FIG. 15 is a schematic diagram showing the sample circuit 1406 a, in accordance with an embodiment of the present invention. The sample circuit 1406 a includes a p-channel transistor 1500 having a gate coupled to ground, a first terminal coupled to V_(dd) and a second terminal coupled to a first terminal of p-channel transistor 1502. The second terminal of transistor 1502 is coupled to sample match line 1402 a, and the gate of transistor 1502 is coupled to the first internal clock/CLK1.

Further, sample match line 1402 a is coupled to an inverter 1504, which is also coupled to the gates of p-channel transistor 1510 and n-channel transistor 1512. One terminal of transistor 1512 is coupled to ground, and the other terminal is coupled to both the sub-match line 1404 a and a terminal of transistor 1510. The other terminal of transistor 1510 is coupled to a first terminal p-channel transistor 1508. The gate of transistor 1508 is coupled to the second internal clock/CLK2 and the second terminal of transistor 1508 is coupled to a terminal of p-channel transistor 1506. The other terminal of transistor 1506 is coupled to V_(dd) and the gate of transistor 1506 is coupled to ground. It should be noted that although only sample circuit 1406 a is illustrated in FIG. 15, sample circuit 1406 b is configured in a similar manner so as to couple sample match line 1402 b and sub-match line 1404 b.

In operation, transistors 1500 and 1502 provide current to the sample match line 1402 a during the clock pulses of the first internal clock/CLK1. At this point, the searched data is provided to the CAM cells coupled to the sample match line 1402 a. If any of these CAM cells do not match the search data for its cell, the sample match line 1402 a is pulled low. Otherwise, the sample match line 1402 a maintains the charge provided by transistors 1500 and 1502. The inverter 1504 then inverts the search result on sample match line 1402 a and provides the inverted result to the gates of transistors 1510 and 1512.

Depending on the state of the sample match line 1402 a, transistors 1506 and 1508 may or may not provide current to the sub-match line 1404 a during the clock pulses of he second internal clock/CLK2. Specifically, when the sample match line 1402 a is high the inverter 1504 provides an inverted sample match line, which is low, to the gates of transistors 1510 and 1512. In this case, the low voltage at the gate of transistor 1510 will turn transistor 1510 on, thus providing current to the sub-match line 1404 a during the next pulse of the second internal clock/CLK2. Conversely, when the sample match line 1402 a is low the inverter 1504 provides an inverted sample match line, which is high, to the gates of transistors 1510 and 1512. In this case, the high voltage at the gate of transistor 1510 will turn transistor 1510 off, thus preventing current from flowing to the sub-match line 1404 a. In addition, the high voltage at the gate of transistor 1512 will turn transistor 1512 on, thus pulling the sub-match line 1404 a low by grounding the sub-match line 1404 a. In this manner, whenever the sample match line 1402 a is pulled low, the sub-match line 1404 a will also be pulled low. However, when the sample match line 1402 a is high, current will be injected into the sub-match line 1404 a to complete the search operation by comparing the search data with the CAM cells coupled to the sub-match line 1404 a.

FIG. 16 is a diagram showing exemplary search signals 1600 for a bit pattern entry that is configured for a NOR/NOR type search, in accordance with an embodiment of the present invention. The exemplary search signals 1600 include the external clock 802, compare lines K0 and K1, the first internal clock/CLK1, the second internal clock/CLK2, the sample match line 1402 a, the sub-match line 1404 a, output 1602, and current 1604. As will be seen, embodiments of the present invention reduce the amount of power utilized during searches by testing a small portion of a particular bit pattern to determine if there is a potential match. If so, the rest of the bit pattern is tested to determine if a match exist. If the sample does not match, power is not wasted testing the remainder of the bit pattern.

In the example of FIG. 16, the comparand matches the bit pattern entry for the first and second external clock cycles 802 a and 802 b, and does not match the bit pattern entry for the third and fourth external clock cycles 802 c and 802 d. In particular, the sample portion of the bit pattern entry does not match the corresponding portion of the comparand during the third and fourth external clock cycles 802 c and 802 d. As will be explained in greater detail below, current is not injected into the sub-match line 1404 a when the sample portion of the bit pattern entry misses, thus conserving power during the third and fourth external clock cycles 802 c and 802 d.

During the first external clock cycle 802 a the comparand is loaded on the compare lines for the bit pattern entry. When the compare lines are charged, the first pulse 1606 a of the first internal clock/CLK1 occurs. During the first internal pulse 1606 a of the first internal clock/CLK1, current is injected into the sample match line 1402 a, as shown at point 1607. The current is also reflected in the current graph 1604 at point 1609. As discussed above, the comparand matches the bit pattern entry during the first external clock cycle 802 a. Accordingly, the sample CAM cells coupled to the sample match line 1404 a match the corresponding portions of the comparand. As a result, the current in the sample match line rises at point 1607.

Following the first internal clock pulse 1606 a, the first pulse 1608 a of the second internal clock/CLK2 occurs. As mentioned above, the embodiments of the present invention inject current into the sub-match line 1404 a when the sample match line 1402 a matches a corresponding sample of the comparand. Thus, during the first clock pulse 1608 a of the second internal clock/CLK2, current is injected into the sub-match line at point 1610. As the sub-match line 1404 a ramps up during the first pulse 1608 a of the second internal clock/CLK2, the inverter, NOR gate, and latch coupled to the sub-match line transition the output 1602 from low to high, at point 1612.

Since in this example the comparand remains the same during the second external clock cycle 802 b, the data stored in the bit pattern entry will again match the comparand during the second external clock cycle 802 b. Thus, during the second pulse 1606 b of the first internal clock/CLK1, the sample match line 1402 a is again injected with current from the current generator.

Unlike a conventional CAM, which precharges the match line to zero prior to each active search, embodiments of the present invention do not automatically discharge the match lines between active searches. Thus, if a match line is high as a result of a match during the previous clock cycle, the match line will remain high at the leading edge of the subsequent clock cycle if the comparand continues to match the data stored in the bit pattern entry. For this reason, the current injected in the sample match line is reduced.

Moreover, since the output 1602 follows the sub-match line 1404 a, the output 1602 remains high for the duration of the first and second pulses of the first and second internal clock cycles 1606 a/1606 b and 1608 a/1608 b. More specifically, during the consecutive matches occurring in the first and second external clock cycles 802 a and 802 b, the voltage of the match lines 1402 a and 1404 a remains at a high level, thus continuously driving the output 1602 of the bit pattern entry high for the first and second clock cycles.

The comparand changes during the third external clock cycle 802 c, and thus no longer matches the data stored in the bit pattern entry during this clock cycle. Further, in the example of FIG. 16, the sample portion of the bit pattern no longer matches the corresponding sample bits of the comparand. FIG. 17, discussed later, will illustrate a case wherein the sample portion of the bit pattern matches while the remaining portion of the bit pattern does not match.

Referring back to FIG. 16, during the third pulse 1606 c of the first internal clock/CLK1, current is again injected into the sample match line 1402 a. However, because the sample portion of the comparand does not match the sample portion of the bit pattern coupled to the sample match line 1402 a, the sample match line 1402 a is pulled low, at point 1614. Then, during the third pulse 1608 c of the second internal clock/CLK2, current is not injected into the sub-match line 1404 a since the sample match line 1402 a is low. As mentioned above, when the sample match line 1402 a is low, current from the current generator is blocked from reaching the sub-match line 1404 a by transistor 1510. Moreover, transistor 1512 turns on and pulls the sub-match line 1404 a low when the sample match line is low. As a result, during the third pulse 1608 c of the second internal clock/CLK2, the output 1602 goes low when the voltage of the sub-match line 1404 a reaches a level that is too low to drive the output 1602 high.

As shown in the current graph 1604, the current used during the third external clock cycle 802 c is much less than that used during the first and second external clock cycles 802 a and 802 b. This results from the sample match line 1402 a being smaller than the entire match line, thus requiring less current. Hence, current is only injected during the pulses of the first internal clock/CLK1. During the third pulse 1608 c of the second internal clock/CLK2, current is not injected into the sub-match line 1404 a, as shown in the current graph 1604. In addition, since the comparand also does not match the data stored in the bit pattern entry in the fourth external clock cycle 802 d, the non-matching CAM cells again pull the sample match line 1402 a low. As a result, the sub-match line 1404 a and the output 1602 remain low during the fourth pulse 1608 d of the second internal clock/CLK2.

FIG. 17 is a diagram showing exemplary search signals 1700 for bit pattern entry configured for a NOR/NOR type search, in accordance with an embodiment of the present invention. Similar to FIG. 16, the exemplary search signals 1700 of FIG. 17 include the external clock 802, compare lines K0 and K1, the first internal clock/CLK1, the second internal clock/CLK2, the sample match line 1402 a, the sub-match line 1404 a, output 1602, and current 1604.

In the example of FIG. 17, the comparand matches the bit pattern entry for the first and second external clock cycles 802 a and 802 b, and does not match the bit pattern entry for the third and fourth external clock cycles 802 c and 802 d. In particular, the sample portion of the bit pattern entry matches the corresponding portion of the comparand during the third and fourth external clock cycles 802 c and 802 d, however, the remaining portion of the bit pattern entry does not match the comparand.

During the first external clock cycle 802 a the comparand is loaded on the compare lines for the bit pattern entry. When the compare lines are charged, the first pulse 1606 a of the first internal clock/CLK1 occurs. As previously mentioned, the internal clocks/CLK1 and /CLK2 are inverted clocks. During the first internal pulse 1606 a of the first internal clock/CLK1, current is injected into the sample match line 1402 a, as shown at point 1607. The current is also reflected in the current graph 1604 at point 1609. As discussed above, the comparand matches the bit pattern entry during the first external clock cycle 802 a. Accordingly, the sample CAM cells coupled to the sample match line 1404 a match the corresponding portions of the comparand. As a result, the current in the sample match line rises at point 1607.

The second internal clock then follows the first internal clock, and thus the first pulse 1608 a of the second internal clock/CLK2 occurs. As mentioned above, the embodiments of the present invention inject current into the sub-match line 1404 a when the sample match line 1402 a matches a corresponding sample of the comparand. Thus, during the first clock pulse 1608 a of the second internal clock/CLK2, current is injected into the sub-match line at point 1610. As the sub-match line 1404 a ramps up during the first pulse 1608 a of the second internal clock/CLK2, the inverter, NOR gate, and latch coupled to the sub-match line transition the output 1602 from low to high, at point 1612.

Since in this example the comparand remains the same during the second external clock cycle 802 b, the data stored in the bit pattern entry will again match the comparand during the second external clock cycle 802 b. Thus, during the second pulse 1606 b of the first internal clock/CLK1, the sample match line 1402 a is again injected with current from the current generator. However, this current is reduced since the sample match line 1402 a was already in a high state.

Moreover, since the output 1602 follows the sub-match line 1404 a, the output 1602 remains high for the duration of the first and second pulses of the first and second internal clock cycles 1606 a/1606 b and 1608 a/1608 b. More specifically, during the consecutive matches occurring in the first and second external clock cycles 802 a and 802 b, the voltage of the match lines 1402 a and 1404 a remains at a high level, thus continuously driving the output 1602 of the bit pattern entry high for the first and second clock cycles.

The comparand changes during the third external clock cycle 802 c, and thus no longer matches the data stored in the bit pattern entry during this clock cycle. Further, in the example of FIG. 17, the sample portion of the bit pattern matches the corresponding sample bits of the comparand, while the remaining portion of the bit pattern does not match the comparand.

During the third pulse 1606 c of the first internal clock/CLK1, current is again injected into the sample match line 1402 a, which remains high because the sample portion of the bit pattern entry matches the corresponding sample portion of the comparand, as mentioned above. As a result, current is also injected into the sub-match line 1404 a, which is pulled low because the remaining portion of the bit pattern entry, which is coupled to the sub-match line 1404 a, does not match the remaining portion of the comparand. Hence, during the third pulse 1608c of the second internal clock/CLK2, current is injected into the sub-match line 1404 a, but the sub-match line 1404 a is still pulled low.

As mentioned above, when the sample match line 1402 a is high, current from the current generator is injected into the sub-match line 1404 a by transistor 1510. However, since the remaining portion of the bit pattern entry does not match the remaining portion of the comparand, the CAM cells pull the sub-match line 1404 a low. As a result, during the third pulse 1608 c of the second internal clock/CLK2, the output 1602 goes low when the voltage of the sub-match line 1404 a reaches a level that is too low to drive the output 1102 high. In addition, since the comparand also does not match the data stored in the bit pattern entry in the fourth external clock cycle 802 d, the non-matching CAM cells again pull the sub-match line 1404 a low. As a result, the sub-match line 1404 a and the output 1602 remain low during the fourth pulse 1608d of the second internal clock/CLK2.

Advantageously, embodiments of the present invention reduce the amount of power required in the CAM during search operations by injecting less current into the match lines of bit pattern entries that do not match the comparand. More specifically, when the sample portion of the match line does not match the corresponding sample of the comparand, current is only injected during the first internal clock/CLK1. In addition, by properly choosing bit positions through out the bit pattern entry, the sample portion of the bit pattern entry can be made to have a high probability of missing. In one embodiment, the actual bits included in the sample portion of the bit pattern entry are randomly chosen. In other embodiments, statistics can be used to choose particular bits to include in the sample portion of the bit pattern entry. In all embodiments, corresponding sample bits in the comparand are compared to the selected sample bits in the sample portion of the bit pattern entry.

FIG. 18 is a flowchart showing a method 1800 for reducing power in a CAM during search operations using sample match lines, in accordance with an embodiment of the present invention. In an initial operation 1802, preprocess operations are performed. Preprocess operations include configuring the CAM, receiving a comparand from the search port, and other preprocess operations that will be apparent to those skilled in the art.

In operation 1804, a sample section of stored data is compared to a sample section of the search data. Generally, the bit pattern entry of the present invention includes a plurality of CAM cells coupled to a match line comprised of two sample match lines, and two sub-match lines. The sub-match lines are coupled to inverters, which are coupled to a NOR gate. The output of the NOR gate is provided to a latch, which latches the output of the bit pattern entry.

During a search operation, the NOR/NOR bit pattern entry first compares the search data with the CAM cells coupled to the sample match lines. In following description n is the total number of CAM cells comprising the bit pattern entry. In addition, m is the total number of CAM cells coupled to the sample match lines 1402 a and 1402 b. Thus, m/2 is the number of CAM cells coupled to each sample match line 1402 a and 1402 b. Similarly, (n−m)/2 is the number of CAM cells coupled to each sub-match line. Further, m is smaller than n, and preferably, m is much smaller than n (m<<n).

A determination is then made as to whether the sample stored data matches the sample search data, in operation 1806. If the sample stored data matches the sample search data, the method 1800 branches to operation 1808. Otherwise, the method 1800 branches to operation 1810.

The remaining section of the stored data is compared to the remaining section of the search data if the sample stored data matches the sample search data, in operation 1808. The results of the comparison with the sample match lines are provided to sample circuits after the sample comparison operation 1804. Each of the sample circuits determine whether a hit occurred on the sample match line that is coupled to the sample circuit. Searches then occur only on sub-match lines wherein a hit occurred on the related sample match line. Specifically, if the sample match line is high, the sample circuit injects current into the corresponding sub-match line, thus allowing the CAM cells coupled to the sub-match line to be compared to the search data.

A miss is generated, in operation 1810 if the sample stored data does not match the sample search data. If a sample match line is low, the sample circuit does not inject current into the sub-match line, thus avoiding a search of the CAM cells coupled to the sub-match line. Thus, the sub-match lines will only remain high when both their respective sample match lines are high, and when the remaining portion of the search data matches the remaining portion of the bit pattern entry. The values from each sub-match line are then combined using a NOR gate. The NOR gate ensures that the signal provided to the latch will be high only when both sub-match lines are high. If either sub-match line is pulled low by a non-matching CAM cell, the signal provided to the latch will be low. The latch then latches the match line output until the next active search.

Post process operations are performed in operation 1812. Post process operations include CAM maintenance, hit prioritizing, and other post-process operations that will be apparent to those skilled in the art. Advantageously, embodiments of the present invention reduce the amount of power required in the CAM during search operations by injecting less current into the match lines of bit pattern entries that do not match the comparand. Further, by properly choosing bit positions through out the bit pattern entry, the sample portion of the bit pattern entry can be made to have a high probability of missing.

Although the foregoing invention has been described in some detail for purposes of clarity of understanding, it will be apparent that certain changes and modifications may be practiced within the scope of the appended claims. Accordingly, the present embodiments are to be considered as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalents of the appended claims. 

What is claimed is:
 1. A method for low power searching in a content addressable memory (CAM), comprising the operations of: comparing a sample section of stored data to a corresponding sample section of search data; generating a non-match result if the sample section of the stored data is different from the corresponding section of the search data; and comparing a remaining section of the stored data to a corresponding remaining section of the search data if the sample section of the stored data is equivalent to the corresponding sample section of the search data.
 2. A method as recited in claim 1, wherein the remaining section of the stored data is not compared to the corresponding remaining section of the search data if the sample section of the stored data is different from the corresponding section of the search data.
 3. A method as recited in claim 2, wherein the sample section of stored data is compared to the corresponding sample section of search data using a first clock signal.
 4. A method as recited in claim 3, wherein the remaining section of stored data is compared to the corresponding remaining section of search data using a second clock signal.
 5. A method as recited in claim 4, wherein the first clock signal occurs prior to the second clock signal.
 6. A method as recited in claim 5, wherein a pulse width of the first clock signal is smaller than a pulse width of the second clock signal.
 7. A method as recited in claim 2, wherein the sample section of the stored data is smaller than the remaining section of the stored data.
 8. A method as recited in claim 7, wherein a match line coupled to the stored data comprises a first section and a second section, both the first section and the second section being coupled to a latch via gate.
 9. A method as recited in claim 8, wherein a first portion of the sample section of the stored data is coupled to the first section of the match line and a second portion of the sample section of the stored data is coupled to the second section of the match line.
 10. A match line for a content addressable memory (CAM), comprising: a sample match line coupled to a first set of CAM cells; a sub-match line coupled to a second set of CAM cells; and sample circuitry coupled to the sample match line and coupled to the sub-match line, wherein the sample circuitry provides current to the sub-match line if a sample section of search data corresponding to the first set of CAM cells is equivalent to data stored in the first set of CAM cells.
 11. A match line for a CAM as recited in claim 10, wherein the sample circuitry does not provide current to the sub-match line when the sample section of the search data corresponding to the first set of CAM cells is different from the data stored in the first set of CAM cells.
 12. A match line for a CAM as recited in claim 11, further comprising a first clock and a second clock.
 13. A match line for a CAM as recited in claim 12, wherein the first set of CAM cells coupled to the sample match line are compared to the corresponding sample section of the search data during a clock pulse of the first clock.
 14. A match line for a CAM as recited in claim 13, wherein the second set of CAM cells coupled to the sub-match line are compared to a corresponding remaining section of search data during a clock pulse of the second clock.
 15. A match line for a CAM as recited in claim 14, wherein the clock pulse of the first clock occurs prior to the clock pulse of the second clock.
 16. A match line for a CAM as recited in claim 15, wherein a pulse width of the first clock is smaller than a pulse width of the second clock.
 17. A match line for a CAM as recited in claim 10, wherein the number of CAM cells comprising the first set of CAM cells is less than number of CAM cells comprising the second set of CAM cells.
 18. A content addressable memory (CAM), comprising: sample circuitry coupled to a first clock and a second clock; a sample match line coupled to the sample circuitry, the sample match line further coupled to a first set of CAM cells; a sub-match line coupled to the sample circuitry, the sub-match line further coupled to a second set of CAM cells, wherein the sample circuitry provides current to the sub-match line if a sample section of search data corresponding to the first set of CAM cells is equivalent to data stored in the first set of CAM cells.
 19. A CAM as recited in claim 18, wherein the sample circuitry does not provide current to the sub-match line when the sample section of the search data corresponding to the first set of CAM cells is different from the data stored in the first set of CAM cells.
 20. A CAM as recited in claim 19, wherein the first set of CAM cells coupled to the sample match line are compared to the corresponding sample section of search data during a clock pulse of the first clock.
 21. A CAM as recited in claim 20, wherein the second set of CAM cells coupled to the sub-match line are compared to a corresponding remaining section of the search data during a clock pulse of the second clock.
 22. A CAM as recited in claim 21, wherein the clock pulse of the first clock occurs prior to the clock pulse of the second clock.
 23. A CAM as recited in claim 22, wherein a pulse width of the first clock is smaller than a pulse width of the second clock.
 24. A CAM as recited in claim 18, wherein the number of CAM cells comprising the first set of CAM cells is less than number of CAM cells comprising the second set of CAM cells. 